package com.cyq.day07;

import java.util.Scanner;

public class ClassWork01 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int minNumber = sc.nextInt();
        int maxNumber = sc.nextInt();
        number(minNumber, maxNumber);
    }

    public static void number(int minNumber, int maxNumber) {
        if (minNumber > maxNumber && minNumber < 2) {
            System.out.println("输入错误，最小值不能大于最大值,且必须是大于1的整数");
            return;
        }
        for (int i = minNumber; i <= maxNumber; i++) {
            boolean judge=isNumber(i);
            if (judge){
                System.out.println(i);
            }
        }
    }

    public static boolean isNumber(int number) {
            for (int i = 2; i < number; i++) {
                if (number%i == 0) {
                    return false;
                }
            }
            return true;
            }
    }


